<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>用css3写一个环形进度条</title>
  <style>
      body {
          margin: 0 auto;
          width: 100%;
          height: 100vh;
          display: flex;
          justify-content: center;
          align-items: center;
      }
      .circle-progress {
          width: 200px;
          height: 200px;
          margin: 0 auto;
          border: 1px solid #ccc;
          position: relative;
          box-sizing: border-box;
      }
      .content {
          width: 100px;
          height: 200px;
          position: absolute;
          top: 0;
          overflow: hidden;
      }
      .left {
          left: 0;
      }
      .right {
          right: 0;
      }
      .circle {
          position: absolute;
          width: 160px;
          height: 160px;
          border: 20px solid transparent;
          border-radius: 50%;
          transform: rotate(135deg);
      }
      .left .circle {
          left: 0;
          border-top-color: green;
          border-left-color: green;
          animation: left-circle 5s linear infinite;
        }
      .right .circle {
          right: 0;
          border-bottom-color: green;
          border-right-color: green;
          animation: right-circle 5s linear infinite;
      }
      @keyframes left-circle {
          0%,
          50% {
              transform: rotate(135deg);
          }
          100% {
              transform: rotate(315deg);
          }
      }
      @keyframes right-circle {
          0% {
              transform: rotate(135deg);
          }
          50%,
          100% {
              transform: rotate(315deg);
          }
      }
  </style>
</head>
<body>
<div class="circle-progress">
  <div class="left content">
    <div class="circle"></div>
  </div>
  <div class="right content">
    <div class="circle"></div>
  </div>
</div>
</body>
</html>
